package com.hmsproject.datastructures.comparators;

import java.util.Comparator;

import com.hmsproject.datastructures.Hotel;

public class HotelPopularityComparatorDescending implements Comparator<Hotel> {
	
	private static HotelPopularityComparatorDescending hotelPopularityComparatorDescending = new HotelPopularityComparatorDescending();

	@Override
	public int compare(Hotel hotel1, Hotel hotel2) {
		return hotel2.getStarValue().getPopularity()-hotel1.getStarValue().getPopularity();
	}
	
	private HotelPopularityComparatorDescending(){
		
	}
	
	public static HotelPopularityComparatorDescending getInstance(){
		return hotelPopularityComparatorDescending;
	}		

}
